/**
 * Copyright (c) 2009 by lane.cn@gmail.com
 * All rights reserved.
 */
package com.googlecode.shapeline.web.context.support;

import org.springframework.context.*;

public class ApplicationContextUtils {
	private final static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(ApplicationContextUtils.class.getName());
	private static ApplicationContextUtils _instance = null;
	private ApplicationContext context;
	
	private ApplicationContextUtils() {
	}
	
	public static ApplicationContextUtils getInstance() {
		if (_instance == null) {
			_instance = new ApplicationContextUtils();
		}
		return _instance;
	}
	
	public ApplicationContext getApplicationContext() {
		log.debug("get context in application: " + context);
		return context;
	}
	
	public void setApplicationContext(ApplicationContext applicationContext) {
		context = applicationContext;
	}

}
